/**
 * 
 */
package cn.com.xf.web.form;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;

import org.hibernate.validator.constraints.NotEmpty;

import cn.com.xf.domain.TblOaFaq;

/**
 * @author Administrator
 * 
 */
public class FaqForm extends BaseForm {
	private String faqId;
	private String faqClass;
	private BigDecimal faqOnlineb;
	private String publicTime;
	private String publicMan;
	@NotEmpty(message="问题不能为空")
	private String faqQuestion;
	@NotEmpty(message="答案不能为空")
	private String faqAnswer;

	private String createDateBegin;
	private String createDateEnd;
	
	
	public String getCreateDateBegin() {
		return createDateBegin;
	}

	public void setCreateDateBegin(String createDateBegin) {
		this.createDateBegin = createDateBegin;
	}

	public String getCreateDateEnd() {
		return createDateEnd;
	}

	public void setCreateDateEnd(String createDateEnd) {
		this.createDateEnd = createDateEnd;
	}

	public String getFaqId() {
		return faqId;
	}

	public void setFaqId(String faqId) {
		this.faqId = faqId;
	}

	public String getFaqClass() {
		return faqClass;
	}

	public void setFaqClass(String faqClass) {
		this.faqClass = faqClass;
	}

	public BigDecimal getFaqOnlineb() {
		return faqOnlineb;
	}

	public void setFaqOnlineb(BigDecimal faqOnlineb) {
		this.faqOnlineb = faqOnlineb;
	}

	public String getPublicTime() {
		return publicTime;
	}

	public void setPublicTime(String publicTime) {
		this.publicTime = publicTime;
	}

	public String getPublicMan() {
		return publicMan;
	}

	public void setPublicMan(String publicMan) {
		this.publicMan = publicMan;
	}

	public String getFaqQuestion() {
		return faqQuestion;
	}

	public void setFaqQuestion(String faqQuestion) {
		this.faqQuestion = faqQuestion;
	}

	public String getFaqAnswer() {
		return faqAnswer;
	}

	public void setFaqAnswer(String faqAnswer) {
		this.faqAnswer = faqAnswer;
	}

	public TblOaFaq copyTo() throws Exception {
		TblOaFaq coreFaq = new TblOaFaq();
		coreFaq.setFaqAnswer(faqAnswer);
		coreFaq.setFaqQuestion(faqQuestion);
		coreFaq.setFaqClass(faqClass);
		coreFaq.setPublicMan(publicMan);
		coreFaq.setPublicTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(this.publicTime));
		coreFaq.setDateStr(this.publicTime);
		coreFaq.setFaqOnlineb(-1);
		return coreFaq;
	}

}
